/*
package cloud.xlh.my_system.middle_aware.mq.rabbitmq;

import org.springframework.amqp.AmqpException;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.core.MessagePostProcessor;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import static cloud.xlh.my_system.middle_aware.mq.rabbitmq.RabbitMQConfig.BUSINESS_EXCHANGE_NAME;

*/
/**
 * Created with IntelliJ IDEA.
 *
 * @ project name : xlh_osms
 * @ Author: XuLeHuang
 * @ Date: 2022/7/1 12:02
 * @ Description:
 *//*

@Component
public class BusinessMessageSender {

    @Autowired
    private RabbitTemplate rabbitTemplate;

    public void sendMsg(String msg){
        try {
            Thread.sleep(10000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println("消费");
        rabbitTemplate.convertSendAndReceive(BUSINESS_EXCHANGE_NAME, "", msg , message -> {
            message.getMessageProperties().setExpiration("30000");
            return message;
        });
    }

    public void sendMsgA(String msg){
        rabbitTemplate.convertSendAndReceive(BUSINESS_EXCHANGE_NAME, "", msg);
    }
}
*/
